<?php

namespace Sharks\Core\Persistence\QueryBuilder\Extend;

use ezcQuerySelect;

/**
 * 扩展低层类库
 */
class QuerySelect extends ezcQuerySelect {

    public function __construct($PDO, array $alias = array()) {
        parent::__construct($PDO, $alias);
    }

    /**
     * 重置查询列字段
     */
    public function resetSelect() {
        $this->selectString = null;

        $vars = func_get_args();
        if (!empty($vars)) {
            call_user_func_array(array($this, 'select'), $vars);
        }
        return $this;
    }

    /**
     * 重置limit
     */
    public function resetLimit() {
        $this->limitString = null;
        return $this;
    }
}